package xiao_jin.fantasy.client.renderer.entity;

import com.google.common.collect.Sets;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.client.rendering.v1.EntityModelLayerRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry;
import net.minecraft.client.render.entity.model.EntityModelLayer;
import net.minecraft.util.Identifier;
import xiao_jin.fantasy.client.renderer.entity.model.StrangeSquidEntityModel;
import xiao_jin.fantasy.core.init.FantasyEntity;

import java.util.Set;

import static xiao_jin.fantasy.Fantasy.MOD_ID;

@Environment(EnvType.CLIENT)
public class FantasyEntityClient implements ClientModInitializer {
    private static final Set<EntityModelLayer> LAYERS = Sets.<EntityModelLayer>newHashSet();
    public static final EntityModelLayer MODEL_CUBE_LAYER = new EntityModelLayer(Identifier.of(MOD_ID, "cube"), "main");
    @Override
    public void onInitializeClient() {
        EntityRendererRegistry.register(FantasyEntity.STRANGE_SQUID, StrangeSquidEntityRenderer::new);
//        EntityRendererRegistry.register(FantasyEntity.ALLAY, AllayEntityRenderer::new);
        EntityModelLayerRegistry.registerModelLayer(MODEL_CUBE_LAYER, StrangeSquidEntityModel::getTexturedModelData);
    }
}